package 设计模式.观察者模式;

public class Test {
    public static void main(String[] args) {
        Course course = new Course("Java课程");
        Teacher teacher = new Teacher("王细细");
        //Teacher teacher2 = new Teacher("罗下午");
        course.addObserver(teacher);
        //course.addObserver(teacher2);

        //逻辑代码
        Question question = new Question();
        question.setUserName("张三");
        question.setQuestionContent("为什么final不可变？");
        course.produceQuestion(course,question);
    }


}
